﻿<UserControl
    x:Class="Results.Views.GroupsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">
    <Grid
        x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition
                Height="Auto" />
            <RowDefinition
                Height="Auto" />
        </Grid.RowDefinitions>
        <Rectangle
            Grid.Row="1">
            <Rectangle.Fill>
                <LinearGradientBrush
                    EndPoint="0.5,1"
                    StartPoint="0.5,0">
                    <GradientStop
                        Color="White"
                        Offset="0" />
                    <GradientStop
                        Color="Silver"
                        Offset="1" />
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <TextBlock
            Text="Divisions"
            FontSize="18" />
        <ItemsControl
            Grid.Row="1"
            ItemsSource="{Binding Groups}">
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <RadioButton
                        GroupName="Divisions"
                        Command="{Binding GroupSelected}"
                        IsChecked="{Binding Selected}">
                        <TextBlock
                            Text="{Binding Group}" />
                    </RadioButton>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel
                        Orientation="Vertical" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
        </ItemsControl>
    </Grid>
</UserControl>
